Produced by Araxis Merge on 2021-05-13 09:09:06 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | /Applications/Ampps/www/Porto 3.2.2/Theme Files/Magento 2.x/Porto Theme/app/design/frontend/Smartwave/porto/Smartwave_Porto/templates/html | sidebar_sticky.phtml | 2019-12-13 07:51:32 +0000 |
| 2 | /Applications/Ampps/www/Porto v4.0.0/Theme Files/Magento 2.x/Porto Theme/app/design/frontend/Smartwave/porto/Smartwave_Porto/templates/html | sidebar_sticky.phtml | 2021-02-04 10:09:02 +0000 |
| Description | Between Files 1 and 2 | |
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 162 |
| Changed | 0 | 0 |
| Inserted | 0 | 0 |
| Removed | 2 | 40 |
| Whitespace | Consecutive whitespace is treated as a single space |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
| Active line-pairing rules |
No regular expressions were active.
| 1 | <?php | 1 | <?php | |||
| 2 | $sidebar_sticky = $this->getConfig('porto_settings/general/sidebar_sticky'); | 2 | $sidebar_sticky = $this->getConfig('porto_settings/general/sidebar_sticky'); | |||
| 3 | ?> | 3 | ?> | |||
| 4 | <?php if($sidebar_sticky): ?> | 4 | <?php if($sidebar_sticky): ?> | |||
| 5 | <script type="text/javascript"> | 5 | <script type="text/javascript"> | |||
| 6 | require([ | 6 | require([ | |||
| 7 | 'jquery' | 7 | 'jquery' | |||
| 8 | ], function ($) { | 8 | ], function ($) { | |||
| 9 | if(!$("body").hasClass("page-layout-1column") && !$("body").hasClass("account")) { | 9 | if(!$("body").hasClass("page-layout-1column") && !$("body").hasClass("account")) { | |||
| 10 | $(".sidebar-main").css("position","relative"); | 10 | $(".sidebar-main").css("position","relative"); | |||
| 11 | $(".sidebar-additional").css("position","relative"); | |||||
| 12 | var main_area_pos; | 11 | var main_area_pos; | |||
| 13 | var main_area_height = $(".column.main").outerHeight(); | 12 | var main_area_height = $(".column.main").outerHeight(); | |||
| 14 | var left_side_top = 0; | 13 | var left_side_top = 0; | |||
| 15 | var right_side_top = 0; | 14 | var right_side_top = 0; | |||
| 16 | var cur_Y = pre_Y = 0; | 15 | var cur_Y = pre_Y = 0; | |||
| 17 | $(document).ready(function(){ | 16 | $(document).ready(function(){ | |||
| 18 | setTimeout(function(){stickySidebar();},1000); | 17 | setTimeout(function(){stickySidebar();},1000); | |||
| 19 | }); | 18 | }); | |||
| 20 | $(window).scroll(function(){ | 19 | $(window).scroll(function(){ | |||
| 21 | stickySidebar(); | 20 | stickySidebar(); | |||
| 22 | }); | 21 | }); | |||
| 23 | $(window).resize(function(){ | 22 | $(window).resize(function(){ | |||
| 24 | left_side_top = 0; | 23 | left_side_top = 0; | |||
| 25 | stickySidebar(); | 24 | stickySidebar(); | |||
| 26 | }); | 25 | }); | |||
| 27 | function stickySidebar(){ | 26 | function stickySidebar(){ | |||
| 28 | if($(".column.main").offset()) { | 27 | if($(".column.main").offset()) { | |||
| 29 | main_area_pos = $(".column.main").offset().top; | 28 | main_area_pos = $(".column.main").offset().top; | |||
| 30 | } | 29 | } | |||
| 31 | main_area_height = $(".column.main").outerHeight(); | 30 | main_area_height = $(".column.main").outerHeight(); | |||
| 32 | margin_top = $(".page-header").hasClass("sticky-header")?60:10; | 31 | margin_top = $(".page-header").hasClass("sticky-header")?60:10; | |||
| 33 | margin_bottom = 10; | 32 | margin_bottom = 10; | |||
| 34 | var fixedSideTop = fixedSideBottom = fixedSideTop_r = fixedSideBottom_r = 0; | 33 | var fixedSideTop = fixedSideBottom = fixedSideTop_r = fixedSideBottom_r = 0; | |||
| 35 | cur_Y = $(window).scrollTop(); | 34 | cur_Y = $(window).scrollTop(); | |||
| 36 | if($(".sidebar-main").outerHeight() < main_area_height) { | 35 | if($(".sidebar-main").outerHeight() < main_area_height) { | |||
| 37 | if($(window).height() < $(".sidebar-main").outerHeight() + margin_top + margin_bottom) { | 36 | if($(window).height() < $(".sidebar-main").outerHeight() + margin_top + margin_bottom) { | |||
| 38 | if(main_area_pos >= cur_Y + margin_top) { | 37 | if(main_area_pos >= cur_Y + margin_top) { | |||
| 39 | left_side_top = 0; | 38 | left_side_top = 0; | |||
| 40 | } else if(cur_Y >= main_area_pos + main_area_height - $(window).height()) { | 39 | } else if(cur_Y >= main_area_pos + main_area_height - $(window).height()) { | |||
| 41 | left_side_top = main_area_height - $(".sidebar-main").outerHeight(); | 40 | left_side_top = main_area_height - $(".sidebar-main").outerHeight(); | |||
| 42 | } else { | 41 | } else { | |||
| 43 | if ( cur_Y > pre_Y ) { | 42 | if ( cur_Y > pre_Y ) { | |||
| 44 | if(fixedSideTop) { | 43 | if(fixedSideTop) { | |||
| 45 | fixedSideTop = 0; | 44 | fixedSideTop = 0; | |||
| 46 | left_side_top = $(".sidebar-main").offset().top - main_area_pos; | 45 | left_side_top = $(".sidebar-main").offset().top - main_area_pos; | |||
| 47 | } else if(!fixedSideBottom && $(".sidebar-main").outerHeight() + $(".sidebar-main").offset().top < cur_Y + $(window).height()) { | 46 | } else if(!fixedSideBottom && $(".sidebar-main").outerHeight() + $(".sidebar-main").offset().top < cur_Y + $(window).height()) { | |||
| 48 | fixedSideBottom = 1; | 47 | fixedSideBottom = 1; | |||
| 49 | left_side_top = cur_Y - (main_area_pos + $(".sidebar-main").outerHeight() - $(window).height()) - 10 | 48 | left_side_top = cur_Y - (main_area_pos + $(".sidebar-main").outerHeight() - $(window).height()) - 10 | |||
| 50 | } | 49 | } | |||
| 51 | } else { | 50 | } else { | |||
| 52 | if(fixedSideBottom) { | 51 | if(fixedSideBottom) { | |||
| 53 | fixedSideBottom = 0; | 52 | fixedSideBottom = 0; | |||
| 54 | left_side_top = cur_Y - main_area_pos - $(".sidebar-main").outerHeight() + $(window).height() - 10; | 53 | left_side_top = cur_Y - main_area_pos - $(".sidebar-main").outerHeight() + $(window).height() - 10; | |||
| 55 | } else if(!fixedSideTop && $(".sidebar-main").offset().top >= cur_Y + margin_top) { | 54 | } else if(!fixedSideTop && $(".sidebar-main").offset().top >= cur_Y + margin_top) { | |||
| 56 | fixedSideTop = 1; | 55 | fixedSideTop = 1; | |||
| 57 | left_side_top = cur_Y - main_area_pos + margin_top; | 56 | left_side_top = cur_Y - main_area_pos + margin_top; | |||
| 58 | } | 57 | } | |||
| 59 | 58 | |||||
| 60 | } | 59 | } | |||
| 61 | } | 60 | } | |||
| 62 | } else { | 61 | } else { | |||
| 63 | if ( cur_Y >= ( main_area_pos - margin_top ) && cur_Y + $(".sidebar-main").outerHeight() + margin_top < main_area_pos + main_area_height) { | 62 | if ( cur_Y >= ( main_area_pos - margin_top ) && cur_Y + $(".sidebar-main").outerHeight() + margin_top < main_area_pos + main_area_height) { | |||
| 64 | left_side_top = cur_Y - main_area_pos + margin_top; | 63 | left_side_top = cur_Y - main_area_pos + margin_top; | |||
| 65 | } else if(cur_Y + $(".sidebar-main").outerHeight() + margin_top > main_area_pos + main_area_height) { | 64 | } else if(cur_Y + $(".sidebar-main").outerHeight() + margin_top > main_area_pos + main_area_height) { | |||
| 66 | left_side_top = main_area_height - $(".sidebar-main").outerHeight(); | 65 | left_side_top = main_area_height - $(".sidebar-main").outerHeight(); | |||
| 67 | } else { | 66 | } else { | |||
| 68 | left_side_top = 0; | 67 | left_side_top = 0; | |||
| 69 | } | 68 | } | |||
| 70 | 69 | |||||
| 71 | fixedSideTop = fixedSideBottom = 0; | 70 | fixedSideTop = fixedSideBottom = 0; | |||
| 72 | } | 71 | } | |||
| 73 | $(".sidebar-main").css("top",left_side_top + "px"); | 72 | $(".sidebar-main").css("top",left_side_top + "px"); | |||
| 74 | } else { | 73 | } else { | |||
| 75 | $(".sidebar-main").css("top",0); | 74 | $(".sidebar-main").css("top",0); | |||
| 76 | } | 75 | } | |||
| 77 | if($(".sidebar-additional").outerHeight() < main_area_height) { | |||||
| 78 | if($(window).height() < $(".sidebar-additional").outerHeight() + margin_top + margin_bottom) { | |||||
| 79 | if(main_area_pos >= cur_Y + margin_top) { | |||||
| 80 | right_side_top = 0; | |||||
| 81 | } else if(cur_Y >= main_area_pos + main_area_height - $(window).height()) { | |||||
| 82 | right_side_top = main_area_height - $(".sidebar-additional").outerHeight(); | |||||
| 83 | } else { | |||||
| 84 | if ( cur_Y > pre_Y ) { | |||||
| 85 | if(fixedSideTop_r) { | |||||
| 86 | fixedSideTop_r = 0; | |||||
| 87 | right_side_top = $(".sidebar-additional").offset().top - main_area_pos; | |||||
| 88 | } else if(!fixedSideBottom_r && $(".sidebar-additional").outerHeight() + $(".sidebar-additional").offset().top < cur_Y + $(window).height()) { | |||||
| 89 | fixedSideBottom_r = 1; | |||||
| 90 | right_side_top = cur_Y - (main_area_pos + $(".sidebar-additional").outerHeight() - $(window).height()) - 10 | |||||
| 91 | } | |||||
| 92 | } else { | |||||
| 93 | if(fixedSideBottom_r) { | |||||
| 94 | fixedSideBottom_r = 0; | |||||
| 95 | right_side_top = $(".sidebar-additional").offset().top - main_area_pos; | |||||
| 96 | } else if(!fixedSideTop_r && $(".sidebar-additional").offset().top >= cur_Y + margin_top) { | |||||
| 97 | fixedSideTop_r = 1; | |||||
| 98 | right_side_top = cur_Y - main_area_pos + margin_top; | |||||
| 99 | } | |||||
| 100 | ||||||
| 101 | } | |||||
| 102 | } | |||||
| 103 | } else { | |||||
| 104 | if ( cur_Y >= ( main_area_pos - margin_top ) && cur_Y + $(".sidebar-additional").outerHeight() + margin_top < main_area_pos + main_area_height) { | |||||
| 105 | right_side_top = cur_Y - main_area_pos + margin_top; | |||||
| 106 | } else if(cur_Y + $(".sidebar-additional").outerHeight() + margin_top > main_area_pos + main_area_height) { | |||||
| 107 | right_side_top = main_area_height - $(".sidebar-additional").outerHeight(); | |||||
| 108 | } else { | |||||
| 109 | right_side_top = 0; | |||||
| 110 | } | |||||
| 111 | ||||||
| 112 | fixedSideTop_r = fixedSideBottom_r = 0; | |||||
| 113 | } | |||||
| 114 | $(".sidebar-additional").css("top",right_side_top + "px"); | |||||
| 115 | } | |||||
| 116 | pre_Y = cur_Y; | 76 | pre_Y = cur_Y; | |||
| 117 | } | 77 | } | |||
| 118 | } | 78 | } | |||
| 119 | }); | 79 | }); | |||
| 120 | </script> | 80 | </script> | |||
| 121 | <?php endif; ?> | 81 | <?php endif; ?> |
Araxis Merge (but not the data content of this report) is Copyright © 1993–2019 Araxis Ltd (www.araxis.com). All rights reserved.